package com.sen.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class TestService
 */
public class TestService extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public TestService() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	    /*Map<String,String[]> map = request.getParameterMap();
		System.out.println(map);*/
		response.getOutputStream().print("{\"total\":15,\"rows\":[{\"synonymsId\":1,\"synonymsName\":\"name-1\",\"englishName\":\"ename-1\"}, {\"synonymsId\":2,\"synonymsName\":\"name-2\",\"englishName\":\"ename-2\"}, {\"synonymsId\":3,\"synonymsName\":\"name-3\",\"englishName\":\"ename-3\"}, {\"synonymsId\":4,\"synonymsName\":\"name-4\",\"englishName\":\"ename-4\"}, {\"synonymsId\":5,\"synonymsName\":\"name-5\",\"englishName\":\"ename-5\"}, {\"synonymsId\":6,\"synonymsName\":\"name-6\",\"englishName\":\"ename-6\"}, {\"synonymsId\":7,\"synonymsName\":\"name-7\",\"englishName\":\"ename-7\"}, {\"synonymsId\":8,\"synonymsName\":\"name-8\",\"englishName\":\"ename-8\"}, {\"synonymsId\":9,\"synonymsName\":\"name-9\",\"englishName\":\"ename-9\"}, {\"synonymsId\":10,\"synonymsName\":\"name-10\",\"englishName\":\"ename-10\"}, {\"synonymsId\":11,\"synonymsName\":\"name-11\",\"englishName\":\"ename-11\"}, {\"synonymsId\":12,\"synonymsName\":\"name-12\",\"englishName\":\"ename-12\"}, {\"synonymsId\":13,\"synonymsName\":\"name-13\",\"englishName\":\"ename-13\"}, {\"synonymsId\":14,\"synonymsName\":\"name-14\",\"englishName\":\"ename-14\"}, {\"synonymsId\":15,\"synonymsName\":\"name-15\",\"englishName\":\"ename-15\"}]}");
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		this.doGet(request, response);
	}

}
